import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  {
    path: "/home",
    name: "Home",
    component: Home,
    children: [
      {
        path: "/home/creatEnVue",
        component: () => import("../views/notes/CreatVueEnvironment.vue")
      },
      {
        path: "/home/pleaseExpire",
        component: () => import("../views/notes/PleaseExpire.vue")
      },
      {
        path: "/home/hook",
        component: () => import("../views/notes/Hook.vue")
      },
      {
        path: "/home/mvvm",
        component: () => import("../views/notes/Mvvm.vue")
      },
      {
        path: "/home/cc",
        component: () => import("../views/notes/ComponentsCommunication.vue")
      },
      {
        path: "/home/axios",
        component: () => import("../views/notes/Axios.vue")
      },
      {
        path: "/home/router",
        component: () => import("../views/notes/Router.vue")
      },
      {
        path: "/home/vant",
        component: () => import("../views/notes/Vant.vue")
      },
      {
        path: "/home/vuex",
        component: () => import("../views/notes/Vuex.vue")
      },
      {
        path: "/home/es6",
        component: () => import("../views/notes/ES6.vue")
      }
    ]
  }
];

const router = new VueRouter({
  base: "/siyustate",
  routes
});

export default router;
